package com.huawei.appgallery.foundation.ui.framework.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import com.huawei.appgallery.foundation.ui.framework.cardframe.fragment.TaskFragment;
import com.huawei.appgallery.foundation.ui.framework.fragment.protocol.LoadingFragmentProtocol;
import com.huawei.appgallery.foundation.ui.framework.fragment.protocol.LoadingFragmentProtocol.Request;
import o.azb;
import o.cip;
import o.cir;
import o.dky.d;
import o.dky.h;
import o.dky.i;
import o.evf;

public class LoadingFragment<T extends LoadingFragmentProtocol> extends TaskFragment<T> implements cir {
    private cip ˏ = new cip();

    protected int ॱ() {
        int ʽᐝ = ʽᐝ();
        return ʽᐝ != 0 ? ʽᐝ : i.ˎˎ;
    }

    protected int ʽᐝ() {
        LoadingFragmentProtocol loadingFragmentProtocol = (LoadingFragmentProtocol) ˆ();
        if (loadingFragmentProtocol != null) {
            Request ॱ = loadingFragmentProtocol.ॱ();
            if (ॱ != null) {
                return ॱ.ˎ();
            }
        }
        return 0;
    }

    public View ˋ(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        View inflate = layoutInflater.inflate(ॱ(), viewGroup, false);
        azb.ˏ(inflate);
        inflate.setBackgroundColor(ᐝॱ().getColor(d.ˏॱ));
        evf.ॱ(inflate, d.ˏॱ);
        evf.ॱ(inflate.findViewById(h.ॱـ), d.ˏॱ);
        evf.ॱ(inflate.findViewById(h.ﾟ), d.ˏॱ);
        if (ˊॱ() != null) {
            this.ˏ.ˊ(Boolean.valueOf(ˊॱ().getBoolean("isfromappdetail")).booleanValue());
        }
        this.ˏ.ˎ(inflate);
        this.ˏ.ˋ(new OnClickListener(this) {
            final /* synthetic */ LoadingFragment ॱ;

            {
                this.ॱ = r1;
            }

            public void onClick(View view) {
                this.ॱ.ʿˊ();
            }
        });
        return inflate;
    }

    public void ˏ(String str, boolean z) {
        this.ˏ.ॱ(str, z);
    }

    public void ॱ(int i, boolean z) {
        this.ˏ.ˏ(i, z);
    }

    public void a_(int i) {
        this.ˏ.ॱ(i);
    }
}
